aboutdialog: Fix a code sample
authorTimm Bäder <mail@baedert.org>
Sat, 1 Aug 2020 17:30:31 +0000 (19:30 +0200)
committerTimm Bäder <mail@baedert.org>
Sat, 1 Aug 2020 17:30:31 +0000 (19:30 +0200)
gdk_texture_new_from_file takes a GFile these days.

gtk/gtkaboutdialog.c

index 2bafb769e3edf7286f5c520d10a0f902953c1a67..7c1a1b0e81ebdabcc6a2ed9974602aa8a8e0890e 100644 (file)
  * set the title property explicitly when constructing a GtkAboutDialog,
  * as shown in the following example:
  * |[<!-- language="C" -->
- * GdkTexture *example_logo = gdk_texture_new_from_file ("./logo.png", NULL);
+ * GFile *logo_file = g_file_new_for_path ("./logo.png");
+ * GdkTexture *example_logo = gdk_texture_new_from_file (logo_file, NULL);
+ * g_object_unref (logo_file);
+ *
  * gtk_show_about_dialog (NULL,
  *                        "program-name", "ExampleCode",
  *                        "logo", example_logo,